//
//  NYSubjectListRequest.m
//  NiuWaJiaoYu
//
//  Created by MinLison on 2018/1/11.
//  Copyright © 2018年 niuwaketang. All rights reserved.
//

#import "NYSubjectListRequest.h"

@implementation NYSubjectListRequest
+ (instancetype)requestWithType:(NYSubjectListType)type params:(NSDictionary *)params
{
        NYSubjectListRequest *req = [super requestWithParams:params];
        req.listType = type;
        return req;
}
- (NSString *)url
{
        switch (self.listType)
        {
                case NYSubjectListTypeGoodSubject:
                {
                        return @"/member/goodQuestion";
                }
                        break;
                case NYSubjectListTypeWrongSubject:
                {
                        return @"/member/wrongQuestion";
                }
                        break;
                default:
                        break;
        }
        return @"";
}
- (Class)contentType
{
        return [NYSubjectListModel class];
}

- (NSMutableDictionary *)defaultParams
{
        return @{
                 kRequestKeyUser_ID : NOT_NULL_STRING_DEFAULT_EMPTY(NYUserManager.user_id),
                 kRequestKeyChannel : @(NYUserManager.channelID),
                 kRequestKeyLoginCode : NOT_NULL_STRING_DEFAULT_EMPTY(NYUserManager.logincode),
                 }.mutableCopy;
}
@end
